package com.example.product_practices.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.product_practices.domain.SecurityQuestion;
import com.example.product_practices.mapper.SecurityQuestionMapper;
import com.example.product_practices.service.ISecurityQuestionService;
import org.springframework.stereotype.Service;

@Service
public class SecurityQuestionServiceImpl extends ServiceImpl<SecurityQuestionMapper,SecurityQuestion> implements ISecurityQuestionService{

    @Override
    public Boolean judge(String userId, String answer1, String answer2) {
        SecurityQuestion securityQuestion1 = this.baseMapper.selectById(userId);
        return securityQuestion1.getAnswerOne().equals(answer1)&&securityQuestion1.getAnswerTwo().equals(answer2);
    }
}
